package com.huwei.activemq.mq;

import com.huwei.activemq.entity.MsgEntity;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @Author: 胡伟
 * @Date: 2021/1/14 15:00
 * @Description:
 */
@Component
@RabbitListener(queues = "huwei")
public class Consumer1 {

    @RabbitHandler
    public void getMsg(MsgEntity msg) {
        System.out.println("huwei1->我消费了消息--->" + msg.toString());
    }
}
